package com.fm.jbsql.sql;

/**
 * Created by IntelliJ IDEA.
 * User: syaroshenko
 * Date: Jul 13, 2006
 * Time: 11:36:27 AM
 * Class for supported JDBC drivers enumeration.
 */

/**
 * Class for supported JDBC drivers enumeration.
 */
public final class DbDriverType {
    private final String name;
    private final int value;

    public static final DbDriverType EDT_NONE = new DbDriverType("NONE", 0);
    public static final DbDriverType EDT_SYBASE = new DbDriverType("SYBASE", 1);
    public static final DbDriverType EDT_MSSQL = new DbDriverType("MSSQL", 2);
    public static final DbDriverType EDT_MYSQL = new DbDriverType("MYSQL", 3);

    /**
     * Constructor.
     * @param _name driver name
     * @param _value driver type ID
     */
    private DbDriverType(String _name, int _value) {
        if ( _name == null ) throw new NullPointerException();

        this.name = _name;
        this.value = _value;
    }

    /**
     * Retrieve driver name.
     * @return String
     */
    public String getName() {
        return name;
    }

    /**
     * Retrieve driver type ID.
     * @return String
     */
    public int getValue() {
        return value;
    }
}
